<link rel="stylesheet" type="text/css" href="../css/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="../css/themes/icon.css">
<div id="panel-permission" data-options="border:false;width:100%">
  	<div class="well well-small" style="margin-left: 5px;margin-top: 5px">
		
		<p>
			<span class="badge">提示</span>
			在此你可以对<span class="label-info"><strong>业务资源</strong></span>进行编辑!
		</p>
	</div>
		
    <div id="tb-permission" style="padding:2px 0">
		<table cellpadding="0" cellspacing="0"> 
			<tr>
				<td style="padding-left:2px" class="list-btn">			
					
				</td>
			</tr>
		</table>
	</div>
	<table id="permission-dg" class="easyui-treegrid"  data-options="rownumbers:true,
			animate: true,
			collapsible: true,					
			striped:true,
			border:true,
			//singleSelect:false,
			idField: 'id',
			treeField: 'name',					
			fitColumns: true,
			checkOnSelect:true,
			selectOnCheck:true,
			toolbar:'#tb-permission'">
			<thead>						
				<tr>
					<th field="ck" checkbox="true" ></th>
					<th field="name" width="100">业务名称</th>
					<th field="flowName" width="40">流程名称</th>
					<th field="sortedid" width="40" align="right">排序</th>					
					<th field="status" width="40" align="right" 
						data-options="
							formatter:function(value,row){
		            		  if('A'==row.status)
									return '<font color=green>管理资源<font>';
			            		  else
			            			return '<font color=red>操作资源<font>'; }
							">管理状态</th>
					<th field="pageURL" width="120" align="right">业务路径</th>
					<th field="bizcode" width="40" align="right">业务编码</th>
					<th field="iconcls" width="40" align="right">业务图标</th>
					<th field="fullBizcode" width="80" align="right">完整编码</th>
					<th field="type" width="40" align="right" 
						data-options="
							formatter:function(value,row){
		            		  if('F'==row.type)
									return '<font color=green>菜单<font>';
			            		  else
			            			return '<font color=red>操作<font>'; }
							">应用类型</th>
					<th field="isused" width="40" align="right" 
						data-options="
							formatter:function(value,row){
		            		  if('Y'==row.isused)
								return '<font color=green>是<font>';
		            		  else
		            			return '<font color=red>否<font>';   
							}">启用</th>				
				</tr>
			</thead>
		
		</table>
	  
	<div id='permission-win' class="easyui-window" style="width:900px;height:500px;padding:10px;" title="业务资源"
  		data-options="modal:true,closed:true" >
  		<div class="easyui-layout" data-options="fit:true,border:false">
			<div data-options="region:'center',border:false" title="" style="overflow: hidden;padding: 10px;">
			<div id="tb-permissionEdit" class="easyui-panel edit-btn">
				<div/>						
		    </div>
			<form id="permission-form" method="post">		
				<fieldset>								
					<input name="id" id="id"  type="hidden"/>
					
					<input name="flowName" id="flowName"  type="hidden"/>				
					<input name="parentName" id="parentName"  type="hidden"/>
					<input name="created" id="created"  type="hidden"/>
					<input name="creater" id="creater"  type="hidden"/>
					<input name="status" id="status"  type="hidden"/>
					
					<input name="leader_ids" id="leader_ids"  type="hidden"/>
					 <table>
					 	<tr>
					 		
					 	</tr>
						 <tr>
						    <th>业务名称</th>
							<td><input name="name" id="name" placeholder="请输入组织名称" class="easyui-textbox easyui-validatebox" type="text" style="width:300px" data-options="required:true"/></td>
							<th>业务简称</th>
							<td><input name="short_name" id="short_name" type="text"   class="easyui-textbox easyui-validatebox" style="width:300px" data-options="required:true"/></td>							
						 </tr>
						 
						 <tr>
						 	<th>业务编码</th>
							<td><input name="bizcode" id="bizcode" type="text"   class="easyui-textbox easyui-validatebox" style="width:300px" data-options="required:true"/></td>
							<th>排序编号</th>
							<td><input id="sortedid" name="sortedid" type="text" style="width:300px" class="easyui-textbox"/></td>							
						 </tr>
						 <tr>
						 	<th>前缀名称</th>
							<td><input name="pre_name" id="pre_name" type="text"   class="easyui-textbox easyui-validatebox" style="width:300px" data-options="required:true"/></td>
							<th>主管领导</th>
							<td><input name="leader_name" id="leader_name" type="text" buttonText="选择" class="easyui-textbox easyui-validatebox" style="width:300px" data-options="required:true"/></td>						    						    
						 </tr> 
						 <tr>
						    <th>业务路径</th>
							<td colspan="3"><input class="easyui-textbox" name="pageURL" id="pageUrl" type="text" style="width:680px" /></td>
							
						 </tr>
						 <tr>
						    <th>附加参数</th>
							<td colspan="3"><input class="easyui-textbox" name="addition_param" id="addition_param" type="text" style="width:680px" /></td>
							
						 </tr>
						 <tr>
						    <th>业务图标</th>
							<td><input id="iconcls" name="iconcls" type="text" style="width:300px" class="easyui-textbox easyui-validatebox"/></td>
							
							<th>管理状态</th>
							<td>
								<select id="status" class="easyui-combobox" name="status" style="width:171px;" data-options="required:true">
									<option value="A">管理资源</option>
									<option value="I">操作资源</option>
								</select>
							</td>
						 </tr>
						 <tr>
						 	<th>业务流程</th>
							<td><select id="flowid" name="flowid" class="easyui-combogrid" style="width:300px" data-options="
									panelWidth: 500,
									idField: 'id',
									textField: 'name',									
									method: 'get',
									editable: 'true',									
									columns: [[
										{field:'id',title:'PD ID',width:80},
										{field:'name',title:'流程名称',width:120},
										{field:'version',title:'版本号',width:80,align:'right'},
										{field:'key',title:'KEY',width:80,align:'right'}
									]],
									fitColumns: true
								">
								</select></td>
							<th>上层组织</th>
							<td><input id="parentid" name="parentid" type="text" style="width:300px" class="easyui-textbox easyui-validatebox"/> 
								
								
							</td>						
						    
						 </tr>
						 <tr>
						    <th>是否启用</th>
							<td>
								<select id="isused" class="easyui-combobox" name="isused" style="width:171px;" data-options="required:true">
									<option value="Y">是</option>
									<option value="N">否</option>
								</select>
							</td>
							<th>业务类型</th>
							<td>
								<select id="type" class="easyui-combobox" name="type" style="width:171px;" data-options="required:true">
									<option value="F">菜单</option>
									<option value="O">操作</option>
								</select>
							</td>
							
						 </tr>
						 
						 <tr>
						    <th>启用页面</th>
							<td colspan="3">
								<input type="checkbox" name="defaultUsed" >无须授权启用
								<input type="checkbox" name="listUsed" >列表页面启用
								<input type="checkbox" name="editUsed" >编辑页面启用
								<input type="checkbox" name="viewUsed" >查看页面启用
								<input type="checkbox" name="listViewUsed" >列表查询统计页面启用
								
							</td>						
							
						 </tr>
						 
						 <tr>
							<th>描述</th>
							<td colspan="3"><input class="easyui-textbox" id="remarks" name="remarks"  style="width: 680px;height: 100px;"></input></td>
						</tr>
					 </table>
				</fieldset>
			</form>
		</div>
	</div>
</div> 



	<!------ 生成页面测试	----->
	<div id='generate-win' class="easyui-window" style="width:600px;height:400px;padding:10px;" title="生成页面"
	  		data-options="modal:true,closed:true" >
	  		<div class="easyui-layout" data-options="fit:true,border:false">
				<div data-options="region:'center',border:false" title="" style="overflow: hidden;padding: 10px;">
				<div class="easyui-panel edit-btn">
					<div>
						<a href="javascript:void(0);" class="easyui-linkbutton function-btn " iconcls="icon-edit" plain="true" btn-type="generate">生成</a>
					</div>					
			    </div>
				<form id="permission-form" class="main-form" method="post">		
					<fieldset>
						 <table>					 	
							 <tr>
							    <th>站点名称</th>
								<td><input name="site" id="site" placeholder="请输入站点名称" class="easyui-textbox easyui-validatebox" type="text" style="width:150px"/></td>
								<th>页面名称</th>
								<td><input name="page" id="page" type="text"   class="easyui-textbox easyui-validatebox" style="width:150px"/></td>							
							 </tr>
						 </table>
					</fieldset>
				</form>
			</div>
		</div>
	</div> 
	<!--     生成页面测试 ----->
</div>

<script>

requirejs(['permissionModule','domReady!'],function(perm,doc){
	perm.init(doc);
});	

</script>

